<?php
/**
 * Cookie名前クラスモジュール
 */
require_once dirname(__FILE__) . '/Cookie.php';

/**
 * Cookie名前クラス
 * Enter description here ...
 * @author admin
 *
 */
class Lib_Cookie_Name extends Lib_Cookie
{
	/** クッキー名 */
	protected $_sName;
	/** 有効期限 */
	protected $_iExpireHour;
	/** 有効ＵＲＬパス */
	protected $_sPath;
	/**
	 * コンストラクタ
	 * Enter description here ...
	 * @param unknown_type $sName クッキー名
	 */
	public function __construct( $sName , $iExpireHour = 0, $strPath = '/' )
	{
		$this->_sName = $sName;
		$this->_iExpireHour = $iExpireHour;
		$this->_sPath = $strPath;
		parent::__construct();
	}

	/**
	 * (non-PHPdoc)
	 * @see Lib_Cookie::setValue()
	 */
	public function setValue($vValue )
	{
		parent::setValue($this->_sName, $vValue, $this->_iExpireHour, $this->_sPath);
	}

	/**
	 * (non-PHPdoc)
	 * @see Lib_Cookie::getValue()
	 */
	public function getValue()
	{
		return parent::getValue($this->_sName);
	}

	/**
	 * 削除
	 * Enter description here ...
	 */
	public function deleteCookie()
	{
		setcookie ($this->_sName, "", time() - 3600, $this->_sPath);
	}
}